package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.PaperDao;
import com.neuedu.model.Paper;
import com.neuedu.service.PaperService;

@Service
public class PaperServiceImpl implements PaperService {

	// 依赖注入
	@Autowired
	private PaperDao PaperDao;
	
	public void setPaperDao(PaperDao PaperDao) {
		this.PaperDao = PaperDao;
	}
	
	@Override
	public int countPaper() {
		return PaperDao.countPaper();
	}

	@Override
	public List<Paper> findAll(Map<String, Object> map) {
		return PaperDao.findAll(map);
	}

	@Override
	public int addPaper(Paper u) {
		return PaperDao.addPaper(u);
	}

	@Override
	public int updatePaper(Paper u) {
		return PaperDao.updatePaper(u);
	}

	@Override
	public int deletePaper(int id) {
		return PaperDao.deletePaper(id);
	}

	@Override
	public Paper findOne(int id) {
		// TODO Auto-generated method stub
		return PaperDao.findOne(id);
	}

}